import { BroadCastCall } from "../broadCast/BroadCastCall";
import { MessageBlock } from "../../../../Framework/MQ/MessageBlock";
import { SPanicBuyPlayerMsg } from "../../../../Message/Game/SPanicBuyPlayerMsg";
import { NetDispatcher } from "../../../mvc/core/NetDispatcher";
import { ServerCommand } from "../../mvc/ServerCommand";
//class PanicBuyPlayerCommand
    
    export  class PanicBuyPlayerCommand extends BroadCastCall
    {
        constructor(arg1: Object)
        {
            super(arg1);
            return;
        }

        public /* override */ call(arg1: MessageBlock): void
        {
            var loc1=arg1.messageBase as SPanicBuyPlayerMsg;
            var loc2=_cache.shop.panicBuyDict;
            loc2[loc1.item1Code] = loc1.item1BuyAmount;
            loc2[loc1.item2Code] = loc1.item2BuyAmount;
            loc2[loc1.item3Code] = loc1.item3BuyAmount;
            NetDispatcher.dispatchCmd(ServerCommand.PanicBuyPlayerCommand, loc2);
            return;
        }
    }
